//
//  LGTRWZPaySuccessVC.swift
//  KJLGT
//
//  Created by jenkin on 2019/9/12.
//  Copyright © 2019年 jenkin. All rights reserved.
//

import UIKit

class LGTRWZPaySuccessVC: LGTBaseVC {
    
    override func viewDidLoad() {
        super.viewDidLoad()
    }
    
    override func setUI() {
        super.setUI()
        
        self.setBavBarStyle(navBarHiden: false, title: "支付成功", back: true)
        
        let imageView:UIImageView = LGTViewCreateUtil.share.createImageView(image: "success")
        self.view.addSubview(imageView)
        imageView.snp.makeConstraints { (make) in
            make.centerX.equalToSuperview()
            make.width.height.equalTo(SizeFit(76))
            make.top.equalTo(SizeFit(62) + NavBarH())
        }
        
        //恭喜您充值成功！
        let successLabel:UILabel = LGTViewCreateUtil.share.createLabel(textAlignment: NSTextAlignment.center, textColor: TextColor, fontSize: 0, text: "恭喜您已支付成功！")
        successLabel.font = KBFont(size: SizeFitFloat(18))
        self.view.addSubview(successLabel)
        successLabel.snp.makeConstraints { (make) in
            make.top.equalTo(imageView.snp_bottomMargin).offset(SizeFit(26))
            make.height.equalTo(SizeFit(20))
            make.centerX.equalToSuperview()
        }
        
        let descLabel:UILabel = LGTViewCreateUtil.share.createLabel(textAlignment: NSTextAlignment.left, textColor: TextColor, fontSize: SizeFitFloat(15), text: "提示：您的任务已提交审核，平台将在2个工作日\n为您审核，请及时关注任务状态！")
        descLabel.numberOfLines = 0
        self.view.addSubview(descLabel)
        descLabel.snp.makeConstraints { (make) in
            make.top.equalTo(successLabel.snp_bottomMargin).offset(SizeFit(30))
            //make.height.equalTo(SizeFit(20))
            make.width.equalTo(SizeFit(350))
            make.centerX.equalToSuperview()
        }
        
        let sureBtn  = LGTViewCreateUtil.share.createTextLGTButton(title: "确认", font: Font_Normal_18, color: UIColor.white, selectedColor: UIColor.white, corner: SizeFitFloat(22), backColor: YellowColor)
        self.view.addSubview(sureBtn)
        sureBtn.snp.makeConstraints { (make) in
            make.centerX.equalToSuperview()
            make.height.equalTo(SizeFitFloat(44))
            make.width.equalTo(SizeFit(349))
            make.top.equalTo(descLabel.snp_bottomMargin).offset(SizeFit(76))
        }
        sureBtn.addTarget(self, action: #selector(sureAction), for: UIControl.Event.touchUpInside)
    }
    
    @objc func sureAction(){
        self.navigationController?.popViewController(animated: true)
    }
}
